home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7044 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.3 KB

  1. Path: news.NetVision.net.il!news
  2. From: Jack <avilev@netvision.net.il>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: 680X0 -> PPC translator?
  5. Date: Mon, 08 Apr 1996 10:55:48 -0700
  6. Organization: NetVision LTD.
  7. Message-ID: <31695324.57C8@netvision.net.il>
  8. References: <31499F8E.26A9@netvision.net.il> <volker.0fw1@vb.franken.de>
  9.         <315800D7.1854@sapiens.com> <volker.0g32@vb.franken.de>
  10.         <315C198B.49C2@netvision.net.il> <volker.0g5w@vb.franken.de>
  11.         <1996Apr2.230841.8275@scala.scala.com> <31640B0C.23F5@netvision.net.il> <1586.6669T961T2657@und.ida.liu.se>
  12. NNTP-Posting-Host: ts001p9.pop4a.netvision.net.il
  13. Mime-Version: 1.0
  14. Content-Type: text/plain; charset=us-ascii
  15. Content-Transfer-Encoding: 7bit
  16. X-Mailer: Mozilla 2.01 (Win16; I)
  17.  
  18. Mans Engman wrote:
  19. > Once you think a bit, it's easy to show (prove!) that static code<->data
  20. > distinction can't be determined by an algorithm. It is what theorists call
  21. > an "undecidable" problem. Granted, for a "real" computer with a finite amount
  22. > of memory/indata it can be "solved" by brute-force search, but this is
  23. > not a practical approach.
  24.  
  25. many problems aren't solvable with today's technology, but it doesn't mean
  26. they're not solvable with other yet-to-devised methods, now do they??
  27.  
  28.  
  29. > Okay, let's go on:
  30. > 1) Hilberts 10th problem is a well known, proven undecidable problem. The
  31. > problem is determining whether an integer polynomial equation has a
  32. > (integer) solution.
  33.  
  34. oh please, stick to the subject at hand and stop making irrelevant analogies.
  35.  
  36. > 2) Now imagine a program calculating some function on the indata x, y, ...
  37. > and uses the result as a pc-relative address where we jump. This function,
  38. > and the rest of the program can be constructed such that for all x, y, ...
  39. > we jump to a legal piece of code. Between these code chunks we will of
  40. > course put data to confuse anyone analysing the program! :)
  41.  
  42. you havn't really thought about the implementation of your hypothetic scenario
  43. have you?! in order for what you said to work you must store the offsets from the
  44. current locations in some array, and the inputs are used to calculate the array
  45. entry that should be selected that's all. calculating the correct number of bytes
  46. to skip from arbitrary inputs without using this method is next to impossible
  47. and most practical applications don't use this method.
  48. you can't confuse the analysing program because ALL code sequences can be identified
  49. without a problem, every sequence of words that makes sense as a code sequence must
  50. be executable code and therefore can be identified. by 'makes sense' i mean that the code
  51. makes references to other parts of the program and a sequence of code instructions is 
  52. maintained, you simply have to follow the logic of that section and see if it's interrupted
  53. by some data word without a jump that would prevent such a thing from happening.
  54. you might wanna defer the translation until you make sure this section is actually being
  55. called from somewhere alse.
  56.  
  57. > i)  try different combinations of inputs and simulate the program. Inputs
  58. > include outside calls, memory reads (that may change anytime), or other
  59. > undecidable functions. To be sure the algorithm would have to try *all* of
  60. > them. Combinatorial-explosion-city?
  61.  
  62. not true, as the code makes a jump using the array i mentioned and therefore i know
  63. the possible offsets that exist.
  64.  
  65. Avi Lev.
  66.